<?php
/*
 * code to add a timesheet line to a user's timesheet
*/
// Create connection
include("../inc_files/utils/dbconnection.php");

//sanitise the input data
$taskID = $mysqli->real_escape_string($_POST['taskid']);
$timesheetID = $mysqli->real_escape_string($_POST['timesheetid']);

$query="INSERT INTO timesheet_lines (Task, Timesheet)
VALUES
('$taskID','$timesheetID')";

$mysqli->query($query) or die($mysqli->error);

//tidy up database connection
$mysqli->close();

?>